asOption

fun <T> T?.asOption(): Option<T>

Returns Some if this is not null or None if this is null.

Return

Some if this is not null or None if this is null.

Parameters

T

Type of the nullable value.